package org.extframework.ld.service;

import java.util.List;
import java.util.Map;
import java.util.Set;

import org.extframework.ld.bean.Power;
import org.extframework.ld.content.model.XmlMenuNode;
import org.extframework.ld.xml.base.RightMenu;

/**
 * @author : Dong.Li
 * @created : 2013-1-21
 * @version : 1.0
 * @description :
 */
public interface PowerManager extends BaseManager {
	
	void addPower( Power power );

	void addPower(String name,String type,String parentId,String powerId);
	
	void refreshMenu();
	
	void refreshMenu(List<XmlMenuNode> menuNodes,List<RightMenu> rightMenus);
	
	List<Power> getPowersByUserId(Long id);

	List<Power> getPowersByUserId(Long id, String treeId);
	
	String getPowerToArrayStr(Long userId);
	
	Set<Power> getPowerIdsByRole(Long role);
	
	Map<String, List<Object[]>> getRoleAll(int start, int end,String query);
	
	String getPowerAllToJson();
	
	String getRPowerAllToJson(  Long powerId ,Long roleId  );
	
	void storeRP(Long roleId,String powerIds, String rPowers);
	
	String rPowers(Long roleId,Long powerId);
	
	
}
